/**
 * Project of Vehicle Routing Problem with Time Windows implements 
 * some of well-known algorithms for solving VRPTW and presents new 
 * one.
 *
 * @author Michal Drobny  
 */

package logic.restriction.timeWindow;

import logic.evaluator.Evaluator;
import logic.restriction.Restriction;
import logic.restriction.enumeration.TimeWindowCheckingVariant;
import logic.restriction.interfaces.HasTimeWindow;
import logic.timewindow.TimeWindow;

/**
 * Represents the time window restriction. Time window can be represented by
 * various types. The current type is represented by generic type T. This
 * restriction is responsible for storing the actual time at process of building
 * cycle and checks if all time windows of serviced destinations in cycle are
 * passed. All restriction are stored in object RestrictionAdapter.
 * 
 * @author Michal Drobny
 * @date 26.11.2014
 */
public abstract class TimeWindowRestriction<T extends Comparable<T>, K extends Comparable<K>> extends Restriction implements HasTimeWindow<T> {
	
	protected T currentTime;
	protected TimeWindow<T> timeWindow;
	protected Evaluator timeEvaluator;
	protected TimeWindowCheckingVariant checkingVariant;
	protected Boolean isResetInNewCycle;
	
	public T getCurrentTime() {
		return currentTime;
	}

	@Override
	public TimeWindow<T> getTimeWindow() {
		return timeWindow;
	}

	/**
	 * @return the timeEvaluator
	 */
	public Evaluator getTimeEvaluator() {
		return timeEvaluator;
	}
	
	/**
	 * @return the checkingVariant
	 */
	public TimeWindowCheckingVariant getCheckingVariant() {
		return checkingVariant;
	}
	
	/**
	 * @return whether isResetInNewCycle
	 */
	public Boolean isResetInNewCycle() {
		return isResetInNewCycle;
	}
}